<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- qdoc-manual-contextcmds.qdoc -->
  <title>Document Navigation | QDoc Manual 5.14.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.14</a></td><td ><a href="qdoc-index.html">QDoc Manual</a></td><td >Document Navigation</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qdoc-index.html">Qt 5.14.2 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
  <link rel="prev" href="14-qdoc-commands-contextcommands.html" />
  <link rel="next" href="16-qdoc-commands-status.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="14-qdoc-commands-contextcommands.html">Context Commands</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="16-qdoc-commands-status.html">Status</a>
</p><p/>
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#example">Example</a></li>
<li class="level1"><a href="#commands">Commands</a></li>
<li class="level2"><a href="#previouspage">\previouspage</a></li>
<li class="level2"><a href="#nextpage">\nextpage</a></li>
<li class="level2"><a href="#startpage">\startpage</a></li>
<li class="level2"><a href="#contentspage">\contentspage</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Document Navigation</h1>
<span class="subtitle"></span>
<!-- $$$15-qdoc-commands-navigation.html-description -->
<div class="descr"> <a name="details"></a>
<p>The navigation commands are for linking the pages of a document in a meaningful sequence. Below is a sequence of QDoc comments that shows a typical use of the navigation commands.</p>
<a name="example"></a>
<h2 id="example">Example</h2>
<pre class="cpp">

   /*!
       \page basicqt.html
       \contentspage {Basic Qt} {Contents}
       \nextpage Getting Started

       \indexpage Index
       \startpage Basic Qt

       \title Basic Qt

       The Qt toolkit is a C++ class library and a set of tools for
       building multiplatform GUI programs using a &quot;write once,
       compile anywhere approach&quot;.

       Table of contents:

       \list
       \li \l {Getting Started}
       \li \l {Creating Dialogs}
       \li \l {Creating Main Windows}
       \endlist
   */

   /*!
      \page gettingstarted.html
      \previouspage Basic Qt
      \contentspage {Basic Qt} {Contents}
      \nextpage Creating Dialogs

      \indexpage Index
      \startpage Basic Qt

      \title Getting Started

      This chapter shows how to combine basic C++ with the
      functionality provided by Qt to create a few small graphical
      interface (GUI) applications.
  */

  / *!
      \page creatingdialogs.html
      \previouspage Getting Started
      \contentspage {Basic Qt} {Contents}

      \indexpage Index
      \startpage Basic Qt

      \title Creating Dialogs

      This chapter will teach you how to create dialog boxes using Qt.
  */

  /*!
      \page index.html

      \indexpage Index
      \startpage Basic Qt

      \title Index

      \list
          \li \l {Basic Qt}
          \li \l {Creating Dialogs}
          \li \l {Getting Started}
      \endlist
  */

</pre>
<p>QDoc renders the &quot;Getting Started&quot; page in <code>creatingdialogs.html</code>:</p>
<blockquote>        <table border="0" cellpadding="0" cellspacing="5" width="100%">

        <tr>
        <p>
        [Previous: <a href="15-qdoc-commands-navigation.html#deadlink">
        Basic Qt</a>]
        [<a href="15-qdoc-commands-navigation.html#deadlink">Contents</a>]
        [Next: <a href="15-qdoc-commands-navigation.html#deadlink">
        Creating Dialogs</a>]
        </p>

        <h1 align="center">Getting Started<br /></h1>

        <p>
        This chapter shows how to combine basic C++ with the
        functionality provided by Qt to create a few small graphical
        interface (GUI) applications.
        </p>

        <p>
        [Previous: <a href="15-qdoc-commands-navigation.html#deadlink">
        Basic Qt</a>]
        [<a href="15-qdoc-commands-navigation.html#deadlink">Contents</a>]
        [Next: <a href="15-qdoc-commands-navigation.html#deadlink">
        Creating Dialogs</a>]
        </p>

        </table>
    </blockquote>
<p>The <a href="15-qdoc-commands-navigation.html#startpage-command">\startpage</a> command creates a link to the page the author wants as the first page of a multipage document.</p>
<p>The link is included in the generated HTML source code but has no visual effect on the documentation:</p>
<pre class="cpp">

  <span class="operator">&lt;</span>head<span class="operator">&gt;</span>
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
      <span class="operator">&lt;</span>link rel<span class="operator">=</span><span class="string">&quot;start&quot;</span> href<span class="operator">=</span><span class="string">&quot;basicqt.html&quot;</span> <span class="operator">/</span><span class="operator">&gt;</span>
      <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
  <span class="operator">&lt;</span><span class="operator">/</span>head<span class="operator">&gt;</span>

</pre>
<a name="commands"></a>
<h2 id="commands">Commands</h2>
<a name="previouspage-command"></a><a name="previouspage"></a>
<h3 id="previouspage">\previouspage</h3>
<p>The \previouspage command links the current page to the previous page in a sequence.a The command has two arguments, each enclosed by curly braces: the first is the link target (the title of the previous page), the second is the link text. If the page's title is equivalent to the link text, the second argument can be omitted.</p>
<p>The command must stand alone on its own line.</p>
<a name="nextpage-command"></a><a name="nextpage"></a>
<h3 id="nextpage">\nextpage</h3>
<p>The \nextpage command links the current page to the next page in a sequence. The command follows the same syntax and argument convention as the <a href="15-qdoc-commands-navigation.html#previouspage-command">\previouspage</a> command.</p>
<a name="startpage-command"></a><a name="startpage"></a>
<h3 id="startpage">\startpage</h3>
<p>The \startpage command specifies the first page of a sequence of pages. The command must stand alone on its own line, and its unique argument is the title of the first document.</p>
<p>QDoc will generate a link to the start page and include it in the generated HTML file, but this has no visual effect on the documentation. The generated link type tells browsers and search engines which document is considered by the author to be the starting point of the collection.</p>
<a name="contentspage-command"></a><a name="contentspage"></a>
<h3 id="contentspage">\contentspage</h3>
<p>The \contentspage command links the current page to a table of contents page. The command follows the same syntax and argument convention as the <a href="15-qdoc-commands-navigation.html#previouspage-command">\previouspage</a> command.</p>
</div>
<!-- @@@15-qdoc-commands-navigation.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="14-qdoc-commands-contextcommands.html">Context Commands</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="16-qdoc-commands-status.html">Status</a>
</p>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2020 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
